<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="ko">
<head>
	<%@ include file="/include/header.jsp" %>
	<link rel="stylesheet" href="<%=cp %>/css/board.css">
	<link rel="stylesheet" href="<%=cp %>/css/default.css">
	<%@ include file="/include/commonRes.jsp" %>
	<script type="text/javascript">
		$(function(){
			
			$("input[name='chk_wr_id']").click(function(){
				var allcnt=$("input[name='chk_wr_id']").size();
				var chkcnt=$("input[name='chk_wr_id']:checked").size();
				
				var chkall=$("#chkall");
				
				if(chkcnt==allcnt){
					chkall.attr("checked","checked");
				} else{
					chkall.removeAttr("checked");
				}
			});
			
			$("#wr_delete").click(function(){
				var chk_contents=$("input[name='chk_wr_id']:checked");
				var chkArr=new Array();
				
				if(chk_contents.size()<=0){
					alert("삭제할 글을 선택하여주세요.");
					return false;
				}			
				for(var seq=0;seq<chk_contents.size();seq++){
					var chk_content=chk_contents[seq].value

					chkArr.push(chk_content);
				}
				
				var paramData={"deleteList":chkArr.toString()};
				
				var success=function(data){
					if(data.resultCode=="0000"){
						alert("삭제 처리가 정상적으로 적용 되었습니다.");
					} 
					location.reload();
				}
				var error=function(xhr,error,response){
					alert("시스템 오류입니다. 다시 시도해주세요.");
				}
				var dataType="json";
				var type="POST";
				var url="<%=cp%>/notice_delete.do";
				sendAjax(type,dataType,url,paramData,success,error);
				
				
				return false;
			});
			
			$("#chkall").click(function(){
				var isChk=$(this).is(":checked");
				var chk_wr_id=$("input[name='chk_wr_id']");
				
				if(isChk) {
					chk_wr_id.attr("checked","checked");
				} else {
					chk_wr_id.removeAttr("checked");
				}
			});
		});
	</script>
</head>
<body>
<div id="hd_login_msg">최고관리자 최고관리자님 로그인 중 <a href="http://mkis.fieram.gethompy.com/bbs/logout.php">로그아웃</a></div>
<%@include file="/include/mainMenuHeader.jsp" %>
<div id="wrapper">
    <div style="margin-bottom:10px;width:80%; float:left;">
		<nav id="bo_cate">
	    	<ul id="bo_cate_ul">
           		<li>
					<a href="#" id="dept_all" class="blackBold">나의 Teamtouch</a>
				</li>
				<li>
					<a href="#" id="dept_service1" >나의 팀  Teamtouch</a>
				</li>
				
				<!--<li>
					<a href="#" id="dept_service1" >팀장 Teamtouch</a>
				</li>
				<li>
					<a href="#" id="dept_service1" >과장  Teamtouch</a>
				</li>
				<li>
					<a href="#" id="dept_service1" >사원  Teamtouch</a>
				</li>				
				<li>
					<a href="#" id="dept_service1" >차장  Teamtouch</a>
				</li>
				<li>
					<a href="#" id="dept_service1" >부장  Teamtouch</a>
				</li>
				<li>
					<a href="#" id="dept_service1" >원장  Teamtouch</a>
				</li>-->				
			</ul>
									
           </nav>
   	  </div>	
   	      
	   <div class="bo_fx" style="clear:both;">	    
	        <!-- list -->
		    <div class="tbl_head01 tbl_wrap">
		        <div class="notice_li_table">
					<ul class="subject th">
						<li class="col chk_area"><input type="checkbox" id="chkall"></li>
						<li class="num_area">번호</li>
						<li class="title_area">제목</li>
						<li class="date_area">작성일</li>
					</ul>
					<ul class="content">
						<li class="col font11 chk_area"><input type="checkbox" name="chk_wr_id" value="7"></li>
						<li class="font11 num_area">1</li>								
						<li class="font11 title_area">
							<a href="#" onclick="view('7')"> 
								<span class="fontBold">[2015-02-06]</span>&nbsp;Teamtouch
							</a>
						</li>	
						<li class="font11 date_area">2015-02-06</li>
 					</ul>
				</div>
		    </div>
	    
	    
	    </div>
	    <div style="text-align: center;">
			<!-- 검색조건 -->
			<fieldset id="bo_sch">
			    <legend>게시물 검색</legend>
			    <form name="fsearch" method="get">
				    <div class="list_search">
				       <!-- 날짜검색조건 -->
				       <span class="search_date">
				            <select name="year">
				  				<option value="2015">2015</option>            
							</select>
						    <select name="month">
					  			<option value="01" selected>01</option>
					            <option value="02">02</option>                      
						    </select>
				       </span>
				       <!-- 제목/이름검색조건 -->
				       <span>
				           <input type="hidden" name="bo_table" value="job_daily">
						   <input type="hidden" name="sca" value="">
						   <input type="hidden" name="sop" value="and">
						   <label for="sfl" class="sound_only">검색대상</label>
						   <select name="sfl">
						        <option value="wr_subject">제목</option>
						        <option value="wr_content">작성일</option>
						   </select>
						   <input name="stx" value="" placeholder="검색어(필수)" required="" id="stx" class="required frm_input" size="15" maxlength="15">
						   <input type="submit" value="검색" class="btn_submit">	
				       </span> 				   
				 </div>   
			    </form>
			</fieldset>
		</div>
		
	</div>
	<%@ include file="/include/pageInc.jsp"%>
</div>
<%@ include file="/include/footer.jsp" %>

</body>
</html>